package com.smh.a08ThreadDemo8;

public class ThreadMethod4 {
    public static void main(String[] args) throws InterruptedException {

        MyThread myThread = new MyThread();

        myThread.setName("tudou");

        myThread.start();

        myThread.join();//将土豆线程插入到当前线程之前
        //当前线程就是main线程

        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName() + "@" + i);
        }


    }
}
